Provides an embedded Chromium-based web browser that can be
integrated into desktop applications. The library is implemented
using the Microsoft Edge WebView2 runtime and provides a much
simpler API which can be used with most languages, without requiring
direct use of the COM-based interfaces in the WebView2 SDK.
Reference
Library Information
| File Name |
CSHTMV12.DLL |
| Version |
12.0.3041.1380 |
| LibID |
175ACE49-FE5D-46C8-A0EF-5188C97B993D |
| Import Library |
CSHTMV12.LIB |
| Dependencies |
Microsoft Edge WebView2 Runtime |
Overview
The SocketTools WebView library makes it possible to embed modern web
content into Windows applications using a simple procedural interface.
Developers can work entirely with standard data types and function calls,
avoiding the complexity of COM programming or .NET interop layers. The
API is designed to be language-agnostic and can be called from C or C++,
as well as other environments that support invoking functions from a
dynamic link library. Applications can use a traditional Windows GUI or
be console-based, and functions are thread-safe where appropriate.
Because the library encapsulates the creation of the Edge WebView2
environment and its associated controller, applications require only
minimal setup. Developers can host a browser window, execute scripts,
or capture output with just a few lines of code. Advanced features such
as asynchronous execution, response header enumeration, and event
callbacks are supported, but optional, making it easy to start with a
simple application and grow into more complex scenarios.
Applications are not limited to navigating to external websites.
You can dynamically generate HTML content within your program and load
it directly into the browser, making it possible to render reports,
status pages, or other application data without creating temporary
files. The browser also supports displaying local content using
file:// URLs, including HTML, images, PDF documents, and
other formats that WebView2 can natively render. This makes it easy to
blend remote and local resources within the same user interface.
When connecting to web servers, the control uses the underlying
WebView2 runtime and supports modern versions of HTTP, including
HTTP/1.1, HTTP/2, and HTTP/3 where available. Connections are secured
with Transport Layer Security (TLS), with support for TLS 1.2 and TLS
1.3 by default, and certificate validation is performed automatically
by the runtime. This ensures that applications embedding the browser
benefit from the same security standards as Microsoft Edge, including
enforcement of current best practices for encryption and certificate
handling.
Unlike most SocketTools libraries which return pseudo-handles to
reference client sessions, the WebView library uses window
handles (HWND) for nearly all of its functions. The only exceptions
are the functions used to create or attach to a WebView instance. This
design provides a direct connection between the library and the
underlying windowing system, and ensures consistent behavior with
standard Windows APIs. Even in console applications, the library
creates a host window which provides the handle used with the other
functions. Using window handles also makes integration with GUI
frameworks such as MFC, WinForms, or WPF more natural, since those
frameworks are already designed around standard Windows window
management.
Requirements
The SocketTools Library Edition is compatible with any
programming language that can call functions exported from a
standard Windows DLL. If you are using Visual Studio, the
minimum supported version is Visual Studio 2010 with Service
Pack 1 (SP1). The header files are compatible with modern
C/C++ compilers, and function declarations are provided for
several other languages. We recommend installing the latest
updates for your development tools and the Windows SDK.
SocketTools supports Windows 7 SP1, Windows Server 2008 R2 SP1,
and later desktop and server versions of Windows, with Windows 8.1
as the minimum supported version for Windows 8-based systems.
Both 32-bit and 64-bit Windows platforms are supported for
application development. Windows on ARM requires Windows 10
build 1709 or later. We recommend using a version of Windows
that is currently supported by Microsoft for application
development.
SocketTools provides 32-bit x86, 64-bit x64, and native ARM64
libraries. The x86 libraries maintain compatibility with legacy
development tools and can run under emulation on Windows on ARM.
Native ARM32 applications are not supported because Microsoft
discontinued support for 32-bit ARM applications in Windows.
For native ARM64 development, we recommend Visual Studio 2019 or
later. Some development tools, including recent versions of
Embarcadero Delphi, support Windows on ARM using the ARM64EC
architecture. ARM64EC applications can use x64 DLLs through emulation,
but cannot load native ARM64 DLLs. Developers targeting ARM64EC
should use the SocketTools x64 libraries rather than the native
ARM64 libraries.
Import libraries are provided in COFF format for x86, x64, and
ARM64 platforms. OMF libraries are also provided for x86, and ELF
libraries for x64, to support older Borland and Embarcadero
compilers. Visual Studio developers should use the standard COFF
libraries. Some programming languages can call exported DLL
functions directly without requiring an import library.
Distribution
When distributing an application that uses this library, we
recommend installing the SocketTools DLL in the same folder as
the application executable. This simplifies deployment and
avoids potential conflicts with other applications that use
different versions of the library. The DLL must be compatible
with the application's processor architecture (x86, x64, or
ARM64). If the library is installed in a shared system location,
the installer should manage it as a shared DLL to prevent other
applications from being affected when it is updated or removed.
SocketTools libraries are standard Windows DLLs, not ActiveX
components, and do not require COM registration.
The WebView library provides its own interface to the Microsoft
Edge WebView2 Runtime. Applications that use this library do not
need to install the Microsoft.Web.WebView2 NuGet package or
reference the WebView2 SDK directly. All interaction with the
WebView2 Runtime is handled internally by SocketTools, and no
additional WebView2 SDK libraries need to be distributed with
your application.
Although the WebView2 SDK is not required, the Microsoft Edge
WebView2 Runtime must be installed on the target system. On
current versions of Windows 10 and Windows 11, the runtime is
generally included with the operating system and updated
automatically. On earlier platforms, you may need to install
the runtime using Microsoft's Evergreen installer. We recommend
using the Evergreen Runtime rather than a fixed version because
it receives security updates and feature improvements
automatically through Microsoft's update mechanisms, without
requiring changes to your application.
The WebView2 Runtime is available as a separate download from
Microsoft. For current download links and redistribution
guidelines, please refer to the SocketTools knowledge base or
Microsoft's official documentation.
|